package cn.kgc.service.impl;

import cn.kgc.mapper.EmployeeMapper;
import cn.kgc.pojo.Employee;
import cn.kgc.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author 陈俊良
 * @version 1.0
 * @date 2022/10/7 - 14:17
 */
@Service
public class EmployeeServiceImpl implements EmployeeService {
    @Autowired
    private EmployeeMapper employeeMapper;


    @Override
    public List<Employee> findEmployeeList(Integer currentPage, Integer limit, String empName) {
        return employeeMapper.findEmployeeList(currentPage,limit,empName);
    }

    @Override
    public int addEmployee(Employee employee) {

        return employeeMapper.addEmployee(employee);
    }

    @Override
    public int deleteEmployee(String empId) {
        return employeeMapper.deleteEmployee(empId);
    }

    @Override
    public int updateEmployee(Employee employee) {

        return employeeMapper.updateEmployee(employee);
    }

    @Override
    public int getTotalCount(String empName) {
        return employeeMapper.getTotalCount(empName);
    }
//echart 页面
    @Override
    public List<Map<String, Object>> queryForList(Integer empId) {
        return employeeMapper.queryForList(empId);
    }
}
